import {
    handleRequest
} from './index';
import request2 from '@/utils/request2'
import { safetyApiUrl } from '@/api/config'


// 获取-早班会记录列表
export function getMeetingRecordList(data) {
    return handleRequest({
        url: '/morning-shift/record/list',
        method: 'post',
        data
    })
}

// 查看-早班会记录详情
export function getMeetingRecordDetail(query) {
    return handleRequest({
        url: '/morning-shift/record',
        method: 'get',
        params: query
    })
}

// 新增-早班会记录
export function addMeetingRecord(data, config) {
    return handleRequest({
        url: '/morning-shift/record',
        method: 'post',
        data,
    }, config)
}

// 删除-早班会记录
export function deleteMeetingRecord(query) {
    return handleRequest({
        url: '/morning-shift/record/del',
        method: 'post',
        params: query
    })
}

// 修改-早班会记录
export function updateMeetingRecord(data) {
    return handleRequest({
        url: '/morning-shift/record/update',
        method: 'post',
        data
    })
}

// 获取-早班会情况统计
export function getRecordStatistics(data) {
    return handleRequest({
        url: '/morning-shift/record/querySum',
        method: 'post',
        data
    })
}
// 获取-早班会统计
export function getMorningShiftCount(data) {
    return handleRequest({
        url: '/morning-shift/count',
        method: 'post',
        data,

    }, {}, 1000000)
}

// 删除
export function del(params) {
  return request2({
    url: safetyApiUrl + '/morning-shift/record/del' ,
    method: 'post',
    params
  })
}